import 'dart:convert';


// ignore: depend_on_referenced_packages
import 'package:json_annotation/json_annotation.dart';

import '../utils/local_datetime.dart';

class LocalDateConverter implements JsonConverter<LocalDate, String> {

  @override
  LocalDate fromJson(String json) {
    return LocalDate.ofString(json);
  }

  @override
  String toJson(LocalDate object) {
    return object.date.toIso8601String();
  }

  const LocalDateConverter();
}
